package com.terminus.composetest

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.core.view.WindowCompat
import com.terminus.composetest.ui.theme.CoorLayoutTheme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        WindowCompat.setDecorFitsSystemWindows(window, false)
        setContent {
            Spacer(
                modifier = Modifier
                    .height(44.dp)
                    .background(Color.Blue)
            )
            Column(
                modifier = Modifier
                    .width(100.dp)
                    .height(300.dp)
                    .background(Color.Black),
                verticalArrangement = Arrangement.Center,
                horizontalAlignment = Alignment.CenterHorizontally
            ) {
                Text(text = "中间", fontSize = 20.sp)
                Text(text = "中间", fontSize = 20.sp)
                Text(text = "中间", fontSize = 20.sp)
                Text(text = "中间", fontSize = 20.sp)
            }
        }
    }
}